//
//  DiscountCustomCollectionViewCell.m
//  FairyDream
//
//  Created by dllo on 15/8/26.
//  Copyright (c) 2015年 dreams. All rights reserved.
//

#import "DiscountCustomCollectionViewCell.h"

@implementation DiscountCustomCollectionViewCell

- (void)dealloc
{
    [_imageViews release];
    [_discountLable release];
    [_priceLable release];
    [_titleLable release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createImageAndLables];
    }
    return self;
}


- (void)createImageAndLables
{
    self.imageViews = [[UIImageView alloc] initWithFrame:CGRectMake(5, 10, self.frame.size.width - 10, self.frame.size.height - 80)];
    [self addSubview:_imageViews];
    
    self.titleLable  = [[UILabel alloc] initWithFrame:CGRectMake(5, self.frame.size.height - 70, self.frame.size.width - 10, 50)];
    self.titleLable.font = [UIFont systemFontOfSize:15];
    self.titleLable.numberOfLines = 0;
    [self addSubview:_titleLable];
    
    self.discountLable = [[UILabel alloc] initWithFrame:CGRectMake(5, self.frame.size.height - 25, 50, 20)];
    self.discountLable.font = [UIFont systemFontOfSize:12];
    [self addSubview:_discountLable];
    
    self.priceLable = [[UILabel alloc] initWithFrame:CGRectMake(self.frame.size.width - 70, self.frame.size.height - 25, 70, 20)];
    self.priceLable.font = [UIFont systemFontOfSize:12];
    self.priceLable.textColor = [UIColor redColor];
    [self addSubview:_priceLable];
    
}


@end
